home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Utilities / Programming / Gooey 1.2 / Gooey 68K ƒ / C Templates / mmMenu.c < prev    next >
Encoding:
Text File  |  1993-12-27  |  6.1 KB  |  83 lines  |  [TEXT/KAHL]

  1. $$Message MM Menu, mm:mmMenu$Prototype.name$.h
  2. $$File mm:mmMenu$Prototype.name$.h
  3. /*  $CopyRight$ */
  4. /*  mmMenu$Prototype.name$                Handle menus
  5.  
  6.     File name:  mmMenu$Prototype.name$.h  
  7.     Function:  This contains the routines to handle menus.
  8.     History: $Date$ Original by $Author$
  9.  
  10.    */
  11.  
  12. /* ======================================================= */
  13. /* ======================================================= */
  14.  
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18.  
  19. /* Initialize the menubar */
  20. void Init_My_Menus(void);
  21.  
  22. /* Handle the menu selection */
  23. void Handle_My_Menu( short theMenu,short theItem);
  24.  
  25. #ifdef __cplusplus
  26. }
  27. #endif
  28.  
  29. /* ======================================================= */
  30. /* ======================================================= */
  31. $$CloseFile
  32. $$Message MM Menu, mm:mmMenu$Prototype.name$.c
  33. $$File mm:mmMenu$Prototype.name$.c
  34. /*  $CopyRight$ */
  35. /*  mmMenu$Prototype.name$                Handle menus
  36.  
  37.     File name:  mmMenu$Prototype.name$.c  
  38.     Function:  This contains the routines to handle menus.
  39.     History: $Date$ Original 
  40.     }
  41.  
  42. Do_$Menu.name$Menu(false,theItem,&SkipProcessing);        /* Post menu handler  */
  43. }
  44.  
  45. /* ======================================================= */
  46.  
  47. $$EndLoop HierMenus
  48. /* ======================================================= */
  49.  
  50. /* Routine: Handle_My_Menu */
  51. /* Purpose: Vector off to the appropiate menu list handler */
  52.  
  53. void Handle_My_Menu(short theMenu,short theItem)
  54. {
  55.  
  56.  
  57. switch (theMenu)                                    /* Do selected menu list */
  58.     {
  59.     $$Loop Menus
  60.     case Res_Menu_$Menu.name$:
  61.         DoMenu$Menu.name$(theItem);                    /* Go handle this list, $Menu.FullName$ */
  62.         break;
  63.     $$EndLoop Menus
  64.     $$Loop HierMenus
  65.     case Res_Menu_$Menu.name$:
  66.         DoMenu$Menu.name$(theItem);                    /* Go handle this list, $Menu.FullName$ */
  67.         break;
  68.     $$EndLoop HierMenus
  69.  
  70.     default:                                        /* allow other buttons, trap for debug */
  71.         Handle_Other_Menus(theMenu,theItem);        /* Handle other special menus */
  72.         break;                                        /* end of otherwise */
  73.     }                                                /* end of switch */
  74.  
  75. HiliteMenu(0);                                        /* Turn menu selection off */
  76. }
  77.  
  78. /* ======================================================= */
  79. /* ======================================================= */
  80. $$CloseFile
  81.  
  82.  
  83.